<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model app\models\Carousel */

$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => '轮播图', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="carousel-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('修改', ['update', 'id' => $model->carousel_id], ['class' => 'btn btn-primary']) ?>
        <?= Html::a('删除', ['delete', 'id' => $model->carousel_id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => '删除，确定?',
                'method' => 'post',
            ],
        ]) ?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        //'options' => ['class' => 'table table-striped table-bordered detail-view'],
        'template' => '<tr><th width=30%>{label}</th><td>{value}</td></tr>',
        //'options' => ['class' => 'table table-striped table-bordered detail-view'],
        'options' => ['class' => 'table table-striped detail-view'],

        'attributes' => [
            'carousel_id',
            //'image',
            [
                'label' => '轮播大图',
                'value' => $model->getViewCarouselPic($model),
                'format'=> 'html',
            ], 
            'link',
            'title',
            'text:ntext',
            'order_num',
            //'status',
            [
                'label' => '状态',
                'value' => $model->getStatus($model),
                'format'=> 'html',
            ],

        ],
    ]) ?>

</div>
